package com.mapper;

import com.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 用户映射器
 *
 * @author admin
 * @date 2023/06/19
 */
@Mapper
public interface UserMapper {
    /**
     * 用户为空
     *
     * @param user 用户
     * @return {@link User}
     */
    @Select("  select user_id userId, username, phone_number phoneNumber, email_address emailAddress, role_id roleId, password\n" +
            "        from user\n" +
            "        where phone_number = #{phoneNumber}\n" +
            "          and password = #{password}")
    User isNull(User user);

}
